package com.lancoo.ccas53.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.lancoo.ccas53.valid.ListValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * <p>
 * 日期禁排
 * </p>
 *
 * @author quin.song
 * @since 2024-05-20
 */
@Data
@Accessors(chain = true)
@TableName("rule_time_prohibit")
@ApiModel(value = "RuleTimeProhibit对象", description = "日期禁排")
public class RuleTimeProhibit implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @NotNull
    private Integer taskId;

    @ListValue(values = {1, 2, 3, 4}, message = "参数校验出错 1、日期禁排  2、场地禁排  3、课程禁排优先排 4、教师禁排优先排")
    @ApiModelProperty("1、日期禁排  2、场地禁排  3、课程禁排优先排 4、教师禁排优先排")
    private Integer optionType;

    @ApiModelProperty("教室id/教学班id/教师id")
    private Long optionId;

    @NotBlank
    @ApiModelProperty("0801 第二周周一第一节")
    private String timeCode;

    @ListValue(values = {1, 2}, message = "参数校验出错 1、禁排 2、优先排")
    @ApiModelProperty("1、禁排 2、优先排")
    private Integer flag;

    @ApiModelProperty("授课方式")
    private Integer hourType;

    private String collegeId;

    @TableField(exist = false)
    private Integer baseRoomId;
    @TableField(exist = false)
    private String baseTeacherId;
}
